#include<bits/stdc++.h>
using namespace std;
#define int long long

double scores[10005];

signed main() {

	int n, k, m;

	cin >> n >> k >> m;

	for (int i = 1; i <= n; i++) {

		double x, mn = INT_MAX, mx = INT_MIN, sum = 0;

		for (int j = 1; j <= k; j++) {
			cin >> x;

			sum += x;
			mn = min(mn, x);
			mx = max(mx, x);
		}
		scores[i] = (sum - mn - mx) / (k - 2);
	}

	sort(scores + 1, scores + n + 1);

	for (int i = n - m + 1; i <= n; i++) {
		cout << fixed << setprecision(3) << scores[i];
		if (i != n)	cout << " ";
	}
	return 0;
}
